package com.qingfeng.client.api;

import com.qingfeng.client.VO.StoreIndexVo;
import com.qingfeng.client.bean.GoodsCommon;
import com.qingfeng.client.dao.GoodsCommonMapper;
import com.qingfeng.client.dao.GoodsTypeMapper;
import com.qingfeng.client.service.StoreService;
import com.qingfeng.util.ApiMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2020/1/6 3:29 下午
 */
@Api(tags = "获取店铺中的信息")
@RestController
@RequestMapping("/app/store")
public class StoreApi extends BaseV1Api{

    @Autowired
    private StoreService storeService;

    @Resource
    private GoodsCommonMapper goodsCommonDao;

    @ApiOperation("获取店铺首页信息,参数为店铺id")
    @GetMapping("/{id}")
    public ApiMsg<StoreIndexVo> indexInfo(@PathVariable("id")Long id){
        StoreIndexVo storeIndexVo = storeService.storeInfo(id);
        return success(storeIndexVo);
    }

}
